package com.ruoyi.web.controller.system;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.system.domain.MeetingSystem;
import com.ruoyi.system.service.IMeetingSystemService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @author sun li
 * @Date 2019/3/30 14:25
 * @Description
 */
@Controller
@RequestMapping("/system/geren")
public class GeRenController extends BaseController {
    private String prefix = "system/paiming";

    @Autowired
    private IMeetingSystemService meetingSystemService;

        /** 跳转到 个人 信息排名的首页*/
    @RequiresPermissions("system:geren:view")
    @GetMapping()
    public String meetingSystem()
    {
        return prefix + "/geren";
    }


    /**
     * 查询个人的积分 还有排名
     */
    @RequiresPermissions("system:geren:list")
    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(MeetingSystem meetingSystem)
    {
        startPage();
        List<MeetingSystem> list = meetingSystemService.selectgeren(meetingSystem);
        return getDataTable(list);
    }




}
